namespace INVARIANT_CONDITION_GEN {

	namespace bad_1 {
	
		extern void process_bytes(char bytes[], unsigned size);
		extern void set_err_flag();

		int foo(char bytes[], int size)
		{
			if (size > 0) {
				process_bytes(bytes, (unsigned)size);
			}
			else if (size == -1) {
				set_err_flag();
				if (size < 0) {
					set_err_flag();
				}
				return -1;
			}
			return 0;
		}
	
	}


	namespace bad_2 {
		extern void execute_task();
		extern void submit_delay();

		const int KIND_X_MASK = 0x01;

		void checked_run(bool flag, int kind) {
			if (flag || (kind & KIND_X_MASK == 0)) {
				execute_task();
			}
			else {
				submit_delay();
			}
		}
	}
}